package com.hymall.controller.admin;

import com.hymall.bean.MarketStorage;
import com.hymall.bean.common.BaseRespVo;
import com.hymall.bean.vo.GoodsDetailVO;
import com.hymall.service.admin.GoodsService;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.UUID;

/**
 * @Author: haiyuny
 * @Date: 2022/7/18 18:15
 * @Description:
 */
@RestController
//@RequestMapping("admin/storage")
public class AdminStorageController {
    @Autowired
    GoodsService goodsService;
   @PostMapping("create")

    public BaseRespVo create(MultipartFile file){
       MarketStorage pvo = goodsService.create(file);
       return BaseRespVo.ok(pvo);
   }
}
